@echo off

set output=iv.elf

set armdir=c:\arm
set sdkdir=..\sdk
set lib_o=..\Lib.o

if exist %output% del %output%



set src_input=main.c

%armdir%\tcc -I"%sdkdir%" -c -bigend -O2 -apcs /interwork %src_input%

set tmp_o=main.o
set dbg_o=..\dbg\dbg.o

echo =======================================

%armdir%\armlink -reloc -first Lib.o(Lib) -o %output% %tmp_o% %dbg_o% %lib_o%




del %tmp_o%

if exist %output% (
	echo ACK: File `%output%` created
) else (
	echo ERR: File `%output%` not created
)
